<?php

namespace App\Http\Controllers\Api\V2;

use Illuminate\Http\Request;
use App\Services\Warehouse\Model\ERPUser;
use Illuminate\Support\Facades\Auth;

class LoginController extends BaseController
{

    public function __construct()
    {
    }


    public function login(Request $request)
    {
        $designer = ERPUser::query()->where('name', $request['username'])->first();
        $token = Auth::guard($this->guard)->tokenById($designer['uid']);
        return $token;
    }
}
